/*
 * @Date: 2022-03-21 09:49:52
 * @LastEditors: zhaoxm
 * @LastEditTime: 2022-09-14 14:43:08
 * @Description:token 权限控制
 */

import { getUrlAllParameters } from "."
import OladingBusinessUI from "@olading/olading-business-ui"
export const { getToken, saveToken, toLoginPage, notAuthToast, isError } = OladingBusinessUI

export const logout = () => {
  toLoginPage()
}

export const setUrlToken = () => {
  const { token } = getUrlAllParameters()
  if (token) saveToken(token)
}
